from django.db import models

# 员工表
class User(models.Model):
    username=models.CharField(max_length=32)
    password=models.CharField(max_length=225)
    authority=models.IntegerField(default=0)
    dept = models.ForeignKey('Department', on_delete=models.CASCADE)

    class Meta:
        db_table='user'


# 部门表
class Department(models.Model):
    name = models.CharField(max_length=32)


    class Meta:
        db_table = 'department'
